Arm backend: Add real implementation for TOSA dialect ops (re-land)#20537
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20537
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New Failures, 1 PendingAs of commit 3929507 with merge base 821b5a9 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
e9cae82 to
eca8178
Compare
TosaRealOpConfig configures how the real implementation is done. Main point of configuration is which node visitor is used. Currently, this needs to be done with a factory function with lazy import, due to direct imports causing a circular import. Tested by applying the infra to the avg_pool2d Tosa dialect op. The rewrite_avg_pool2d tests can now be ran to verify that the produced Tosa is correct. To make it completely correct, two additional passes need to be added to the test. Signed-off-by: Erik Lundell <erik.lundell@arm.com> Change-Id: I7b573583fe241b63927864684e5ccdd1e4aa2cff
Additionally, - Start pre-computing TOSA ops with real impl in ComputeOpsAOT. - Start running the model in tests were this was previously impossible due to ops not having a real impl. - Some modifications are needed in real_impl to run operators with kwargs. Signed-off-by: Erik Lundell <erik.lundell@arm.com> Change-Id: I94ed6aa08842d8cd57e9f0fb331edc5261b8d044
Signed-off-by: Erik Lundell <erik.lundell@arm.com> Change-Id: Ie29df588ad1afb4b98b7a6f3af37752edd9fa077
Signed-off-by: Erik Lundell <erik.lundell@arm.com> Change-Id: I12d19bcd34ee1071798c0cb70811e34a0a147335
|
I see you removed the ArmQuantizer in the global tests, nice |
…-land)" (#20670) Reverts #20537 This breaks some internal tests due to missing BUCK dependencies on the tosa reference model. I tried to fix forward by just adding those deps (#20642), but it looks like we'll need to do lazy imports here due to some binary size expansion. I'll tackle the reland. cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell
…-land)" v2 (#20674) Summary: Reverts #20670 and relands #20537 In a first commit, Arm backend: Add infra for real implementations of Tosa ops Tested by applying the infra to the avg_pool2d Tosa dialect op. The rewrite_avg_pool2d tests can now be ran to verify that the produced Tosa is correct. To make it completely correct, two additional passes need to be added to the test. Then, Arm backend: Add real impls to all TOSA dialect ops Additionally, Remove special case in ComputeOpsAOT pass for such ops, since they can now be executed. Start running the model in tests were this was previously impossible due to ops not having a real impl. Pull Request resolved: #20674 Differential Revision: D110362915 Pulled By: rascani
In a first commit,
Arm backend: Add infra for real implementations of Tosa ops
Tested by applying the infra to the avg_pool2d Tosa dialect op.
The rewrite_avg_pool2d tests can now be ran to verify that
the produced Tosa is correct. To make it completely correct,
two additional passes need to be added to the test.
Then,
Arm backend: Add real impls to all TOSA dialect ops
Additionally,
since they can now be executed.
impossible due to ops not having a real impl.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani